# Scripts that Generates Main Results

This folder includes scripts that generates the main results used in the paper. The sequence of scripts indicate potential dependency. 
* \* denotes particularly important scripts.
* ^- denotes scripts that one can ignore for now.

## Description of Scripts

| Script | Description |
|:---------|:---------|
| `0_weight.do`* | Funtions that calculate the industry weights. |
| `0_lpolyci.do`^- | Function that generates data points for lpolyci figures. |
| `out_agg_sum_1.do`^- | Generates summary statistics related to top (national) firms. |
| `out_ind_sum_1.do` | Generates summary statistics related to top industry firms. |
| `out_ind_reg.do`* | Runs regressions related to top industry firms. |
| `out_ind_deco.do`* | Improved decomposition regression (adapted from `out_ind_reg.do` and adding sales). |
| `out_ind_con_d_year_data.do` | Calculates the change in industry concentration between 1977 and each subsequent year. |
| `out_ind_con_d_year_fig.do` | Generates figures. |
| `out_city_growth.do`* | Generates results related to city growth (vs initial size). (`out_city_growth_imp.do` produces a subset of results and is not needed if `out_city_growth.do` is rerun.) |
| `out_city_growth_exfig.do`* | Export figures to png (gph created by `out_city_growth.do`). |
| `out_cind_con_city_emp.do`* | Generates results for concentration of top industry firms in city vs city initial size. |
| `out_cind_con_d_city_emp.do`* | Generates results for concentration of top industry firms in city vs change in city size. |
| `out_cind_con_d_city_emp_sales.do`* | Generates results for concentration of top industry firms in city vs change in city size using sales. |
| `out_cind_con_d_city_emp_sales_exfig.do`* | Export figures to png (gph created by `out_cind_con_d_city_emp_sales.do`). |
| `out_cind_new_ind_city_emp_add.do`* | Generates results related to new industries in city. (`out_cind_new_ind_city_emp.do` is a legacy script.) |
| `out_city_jobcr_city_emp_data.do` | Prepares job creation data. |
| `out_city_jobcr_city_emp.do` | Generates figures. Note that we should really use density definition 1 (instad of 2 in the current codes), but the difference is minor. There is also a bug related to rescaling 2007-2013. (`../201910_dev/out_city_jobcr_city_emp.do` has these fixed.) |
| `out_city_jobcr_city_emp_alt.do` (Legacy) | |
| `out_mgrow2_1_c_emp.do`* | Calculates the Sato-Vartia weights for each city-industry and city employment. |
| `out_mgrow2_2_mgrow.do`* | Calculates missing growth in city. |
| `out_mgrow2_fig_sum.do`* | Produces figures and tables. |
| ` ` | |




